function updatePassword() {

    var password1 = $('#password').val();
    var password2 = $('#rePassword').val();
    if (password1 !== password2) {
        $.modal({ body: '两次输入密码不一致' });
        return;
    }

    if (password1.length < 6 || password2.length < 6) {
        $.modal({ body: '密码长度不小于6' });
        return;
    }

    if (!checkIsAllCharOrNumber(password1) || !checkIsAllCharOrNumber(password2)) {
        $.modal({ body: '密码必须是数字和字母' });
        return;
    }

    apiUpdateAdminPassword(password1, function (data) {
        if (data.code === 0) {
            $('#password').val('');
            $('#rePassword').val('');
            $.modal({ body: '修改成功' });
        }
    })

}
